package com.xlhj.boot.mockito.junit5.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xlhj.boot.mockito.junit5.entity.SysUserInfo;
import com.xlhj.boot.mockito.junit5.mapper.SysUserInfoMapper;
import com.xlhj.boot.mockito.junit5.mapstruct.UserInfoMapper;
import com.xlhj.boot.mockito.junit5.service.SysUserInfoService;
import com.xlhj.boot.mockito.junit5.vo.UserInfoVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: caijliu
 * @Date: 29/12/2021 10:24
 * @Description TODO
 * @Vsersion: 0.0.1
 */
@Service
public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUserInfo> implements SysUserInfoService {

    @Resource
    private UserInfoMapper userInfoMapper;

    @Override
    public UserInfoVo getUserInfoById(Long id) {
        final SysUserInfo userInfo = this.getById(id);
        final UserInfoVo userInfoVo = userInfoMapper.map(userInfo);
        return userInfoVo;
    }
}
